//
//  ViewController.m
//  27-Block练习-播放按钮
//
//  Created by dllo on 16/8/19.
//  Copyright © 2016年 ZHW. All rights reserved.
//

#import "ViewController.h"
#import "PlayView.h"
#import <AVFoundation/AVFoundation.h>
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"2"]];
    
    PlayView *playView = [[PlayView alloc] initWithFrame:CGRectMake(0, 200, CGRectGetWidth(self.view.frame), 100)];
    [self.view addSubview:playView];
    [playView play:^(UIButton *play) {
        NSLog(@"播放");
    } pause:^(UIButton *pause) {
        NSLog(@"暂停");
    }];
    
    [playView last:^(UIButton *last) {
        NSLog(@"上一首");
    }];
    [playView next:^(UIButton *next) {
        NSLog(@"下一首");
    }];

    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
